<?php

namespace app\validate;

use think\Validate;

class Space extends Validate
{

    protected $rule = [
        'goods_id' => 'require',
        'space_name' => 'require',
        'space_price' => 'require',
        'stock' => 'require|integer'
    ];
    protected $message = [
        'goods_id.require' => '商品ID必填',
        'space_name.require' => '规格名称必填',
        'space_price.require' => '规格价格必填',
        'stock.require' => '库存必填',
        'stock.integer' => '库存必须为数字'
    ];
    protected $scene = [
      'add'
    ];
}